<template>
  <div class="loading">
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
    <div></div>
  </div>
</template>

<style lang="less" scoped>
.loading {
  width: 200px;
  height: 200px;
  position: fixed;
  top: 40%;
  left: 50%;
  transform: translateY(-50%);
  z-index: 9999;
  > div {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 20px;
  }
  > div::after {
    content: "";
    background-color: red;
    display: block;
    width: 20px;
    height: 20px;
    top: 0;
    right: 0;
    animation: loading 1.6s infinite linear;
    animation-delay: var(--animation-delay);
    border-radius: 50%;
  }
  @keyframes loading {
    0% {
      transform: scale(1);
    }
    100% {
      transform: scale(0);
    }
  }
}
.loading > div:nth-child(1) {
  transform: rotate(60deg);
  --animation-delay: 1s;
}

.loading > div:nth-child(2) {
  transform: rotate(120deg);
  --animation-delay: -0.3s;
}

.loading > div:nth-child(3) {
  transform: rotate(180deg);
  --animation-delay: -0.9s;
}

.loading > div:nth-child(4) {
  transform: rotate(240deg);
  --animation-delay: -0.5s;
}

.loading > div:nth-child(5) {
  transform: rotate(300deg);
  --animation-delay: -0.6s;
}

.loading > div:nth-child(6) {
  transform: rotate(360deg);
  --animation-delay: -0.7s;
}
</style>
